<template>
  <div class="integratedQuery">
    <div class="topbar">
      <p>客户</p>
      <el-input v-model="customerNo" style="width:60px;margin-right:10px;" @blur="customerNoBlur" :disabled="jxAgent"></el-input>
      <el-select v-model="customerName" style="width:90px;" multiple collapse-tags @change="e=>{this.customerNo=e}" :disabled="jxAgent">
        <el-option
          v-for="item in customerList"
          :key="item.value1"
          :label="item.label"
          :value="item.value1">
          <span style="float:left">{{item.value}}</span>
          <span style="float:right">{{item.label}}</span>
        </el-option>
      </el-select>
      <p>款号</p>
      <el-input v-model="styleNumberList"></el-input>
      <!-- <el-select
        v-model="styleNumberList"
        multiple
        filterable
        collapse-tags
        style="width:160px"
        placeholder="请选择">
        <el-option
          v-for="item in kindsNumberList"
          :key="item.value"
          :label="item.label"
          :value="item.value">
        </el-option>
      </el-select> -->
      
      <p class="t_content">日期</p>
      <el-date-picker
        unlink-panels
        v-model="Timedate"
        type="daterange"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        value-format="yyyy-MM-dd HH:mm:ss">
      </el-date-picker>
      <p>查询类型</p>
      <el-select v-model="selectType">
        <el-option
          v-for="item in selectTypeList"
          :key="item.value"
          :label="item.label"
          :value="item.value">
        </el-option>
      </el-select>
    </div>

    <div class="operation">
      <div style="display:flex;">
        <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
        <el-button icon="el-icon-upload2" @click="Exp">导出</el-button>
        <el-button icon="el-icon-copy-document" @click="()=>{this.showCustomer='block'}" :disabled="jxAgent">筛选客户</el-button>
        <el-button style="margin-right:100px;" icon="el-icon-copy-document" @click="()=>{this.showType='block'}">筛选款号</el-button>
        
      </div>
      <div>
        <!-- <el-checkbox-group v-model="checkboxVal" style="margin-right:30px;">
          <el-checkbox v-for="i in checkList" :key="i.value" :label="i.value" border>
            {{i.value}}
          </el-checkbox>
        </el-checkbox-group> -->
        <el-checkbox v-model="bl" border>部类</el-checkbox>
        <el-checkbox v-model="styleNum" border>款号</el-checkbox>
        <el-checkbox v-model="price" border>售价</el-checkbox>
        <!-- <el-checkbox v-model="colorNo" border>色号</el-checkbox> -->
        <el-checkbox v-model="colorName" border>颜色</el-checkbox>
        <el-checkbox v-model="supplier"  border style="margin-right:30px;" :style="{display:gys}">供应商</el-checkbox>
        <el-checkbox v-model="customerno"  border style="margin-right:30px;" :style="{display:kh}">客户编号</el-checkbox>
        <el-checkbox v-model="showimage" border>显示图片</el-checkbox>
        <el-checkbox v-model="twoDimensional" border>二维</el-checkbox>
      </div>
    </div>

    <el-table
      border
      id="outTable"
      show-summary
      :data="tableData"
      style="width: 100%"
      height="74.8vh"
      :summary-method="getList"
      highlight-current-row
      :header-cell-style="{background:'#f4f4f4',padding:0,height:'40px'}"
      :cell-style="{padding:0,height:'26px'}"
      @row-click="rowClick">
      <el-table-column
        prop="commodityType"
        label="部类"
        width="80"
        v-if="bl">
      </el-table-column>
      <el-table-column
        prop="styleNumber"
        label="款号"
        width="180"
        v-if="styleNum">
      </el-table-column>
      <el-table-column
        prop="sellingPrice"
        label="售价"
        width="100"
        v-if="price">
      </el-table-column>
      <!-- <el-table-column
        prop="colorNo"
        label="色号"
        width="80"
        v-if="colorNo">
      </el-table-column> -->
      <el-table-column
        prop="colorName"
        label="颜色"
        show-overflow-tooltip
        width="80"
        v-if="colorName">
      </el-table-column>
      <el-table-column
        prop="manufacturerName"
        label="供应商"
        v-if="supplier">
      </el-table-column>
      <el-table-column
        prop="customerNo"
        label="客户编号"
        v-if="customerno">
      </el-table-column>
      <el-table-column
        prop="factoryInputNumber"
        label="厂进" v-if="!Hp">
      </el-table-column>
      <el-table-column
        prop="customerInputNumber"
        label="客进" v-if="Hp">
      </el-table-column>
      <el-table-column
        prop="customerOutNumber"
        label="客退">
      </el-table-column>
      <el-table-column
        prop="customerSellNumber"
        label="客销">
      </el-table-column>
      <el-table-column
        prop="customerRepertoryNumber"
        label="客存" v-if="Hp">
      </el-table-column>
      <el-table-column
        prop="totalRepertoryNumber"
        label="总存" v-if="!Hp">
      </el-table-column>
      

      <el-table-column label="进" v-if="twoDimensional">
        <el-table-column
          width='50'
          prop="inputFiveNumber"
          label="05-XS">
        </el-table-column>
        <el-table-column
          width='50'
          prop="inputSevenNumber"
          label="07-S">
        </el-table-column>
        <el-table-column
          width='50'
          prop="inputNineNumber"
          label="09-M">
        </el-table-column>
        <el-table-column
          width='50'
          prop="inputElevenNumber"
          label="11-L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="inputThirteenNumber"
          label="13-XL">
        </el-table-column>
        <el-table-column
          width='50'
          prop="inputFifteenNumber"
          label="15-2L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="inputSeventeenNumber"
          label="17-3L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="inputNineteenNumber"
          label="19-4L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="inputTwentyOneNumber"
          label="21-5L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="inputTwentyThreeNumber"
          label="23-6L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="inputFNumber"
          label="F">
        </el-table-column>
      </el-table-column>
      <el-table-column label="销" v-if="twoDimensional">
        <el-table-column
          width='50'
          prop="sellFiveNumber"
          label="05-XS">
        </el-table-column>
        <el-table-column
          width='50'
          prop="sellSevenNumber"
          label="07-S">
        </el-table-column>
        <el-table-column
          width='50'
          prop="sellNineNumber"
          label="09-M">
        </el-table-column>
        <el-table-column
          width='50'
          prop="sellElevenNumber"
          label="11-L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="sellThirteenNumber"
          label="13-XL">
        </el-table-column>
        <el-table-column
          width='50'
          prop="sellFifteenNumber"
          label="15-2L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="sellSeventeenNumber"
          label="17-3L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="sellNineteenNumber"
          label="19-4L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="sellTwentyOneNumber"
          label="21-5L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="sellTwentyThreeNumber"
          label="23-6L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="sellFNumber"
          label="F">
        </el-table-column>
      </el-table-column>
      <el-table-column label="存" v-if="twoDimensional">
        <el-table-column
          width='50'
          prop="repertoryFiveNumber"
          label="05-XS">
        </el-table-column>
        <el-table-column
          width='50'
          prop="repertorySevenNumber"
          label="07-S">
        </el-table-column>
        <el-table-column
          width='50'
          prop="repertoryNineNumber"
          label="09-M">
        </el-table-column>
        <el-table-column
          width='50'
          prop="repertoryElevenNumber"
          label="11-L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="repertoryThirteenNumber"
          label="13-XL">
        </el-table-column>
        <el-table-column
          width='50'
          prop="repertoryFifteenNumber"
          label="15-2L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="repertorySeventeenNumber"
          label="17-3L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="repertoryNineteenNumber"
          label="19-4L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="repertoryTwentyOneNumber"
          label="21-5L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="repertoryTwentyThreeNumber"
          label="23-6L">
        </el-table-column>
        <el-table-column
          width='50'
          prop="repertoryFNumber"
          label="F">
        </el-table-column>
      </el-table-column>
    </el-table>

    <div id="imgBox" :style="{display:showImg}">
      <div class="imgTop">
        <span style="line-height:30px;font-weight:bold;">显示图片</span>
        <i class="el-icon-close" @click="()=>{this.showImg='none',this.showimage=false}"></i>
      </div>
      <div class="img">
        <img style="width:300px;height:355px;" :src="this.image" ondragstart='return false;'>
      </div>
    </div>

    <!-- <div id="pic" :style="{display:Pic}">
      <div class="pic-top">
        <p>显示图片({{num}})</p>
        <i @click="()=>{this.Pic='none',this.checked5=false}" class="el-icon-close"></i>
      </div>
      <div v-for="(item,index) in this.details" :key="index">
      <img style="width:300px;height:355px;" :src="item.images" alt="">
      </div>
    </div> -->

    <screen-customer
      :style="{display:showCustomer}"
      @closeScreenCustomer="()=>{this.showCustomer='none'}"
      @preservationCN="preservationCN">
    </screen-customer>

    <screen-num
    :style="{display:showType}"
    @closeScn="()=>{this.showType='none'}"
    @preservation="preservation"> 
    </screen-num>

    <!-- <screen-type
      :style="{display:showType}"
      @closeScreenType="()=>{this.showType='none'}"> 
    </screen-type> -->

    <foot-view class="footView"
      :pagesNum="pagesNum"
      :hasPagination=true
      :pageSize="limit"
      @handleSizeChange="handleSizeChange"
      @handleCurrentChange="handleCurrentChange">
      <div slot="text">
        <span>数据库：{{jxQuarter}}</span>
      </div>
    </foot-view>

  </div>
</template>

<script>
import footView from '../../../components/FootView'
import screenCustomer from './childComps/screenCustomer'
import screenNum from '../WarehouseInventory/childComp/screenNum'
import { getClient } from '../../../network/client'
import { inputOutSaveRepertoryIntegratedQuery,cutomerDataQuery } from '../../../network/inputOutSaveRepertory'
import outexp from '../../../components/mixins/outexp'
import today from '../../../components/mixins/today'
import enterUp from '../../../components/mixins/enterUp'
import {getNumber} from '../../../network/quarter'

export default {
  name:'integrated_query_i',
  mixins: [today,enterUp,outexp],
  created(){
    // 默认选之前一周
    // this.Timedate = [this.getLastWeek(),this.getNowTime()]
    this.inpList = this.getInput()
    // 获取客户列表
    getClient().then(res => {
      console.log(res)
      if (res.data.code == 200) {
        let list = res.data.data
        list.forEach(e => {
          if(e.stop != 1){
            this.customerList.push({value:e.no,label:e.name,value1:e.id})
          }
        })
        if (this.jxAgent) {
          for (const i of this.customerList) {
            if (i.label == this.operator) {
              this.customerNo = i.value1
              this.customerId = i.value1
              this.customerName = i.value
              break
            }
          }
        }
      }
    })

    // 获取款号列表
    getNumber(JSON.stringify([''])).then(res => {
      if (res.data.code == 200) {
        res.data.data.forEach(e => {
          this.kindsNumberList.push({value:e.styleNumber,label:e.styleNumber})
        })
      }
    })
  },
  data(){
    return {
      sortArr:[],
      result:[],
      result1:[],
      customerId:[],
      jxQuarter: document.cookie.match(RegExp('jxQuarter'+'=([^;]+)'))[1],
      image:'',
      gys:'block',
      kh:'none',
      customerno:false,
      supplier:true,
      styleNum:true,
      price:true,
      // colorNo:true,
      bl:true,
      colorName:true,
      ary:['部类id','颜色id','客户id','客户编号','客户简称','图片','客进','客存'],//货品进销存 不导出字段 2维
      ary1:['部类id','颜色id','客户id','客户简称','供应商名称','图片','厂进','总存'],//客户进销存 不导出字段

      ary2:['部类id','颜色id','客户id','客户编号','客户简称','图片','客进','客存','进c05-XS','进c07-S','进c09-M','进c11-L','进c13-XL','进c15-2L','进c17-3L','进c19-4L','进c21-5L','进c23-6L','进cf',
      '销c05-XS','销c07-S','销c09-M','销c11-L','销c13-XL','销c15-2L','销c17-3L','销c19-4L','销c21-5L','销c23-6L','销cf',
      '存c05-XS','存c07-S','存c09-M','存c11-L','存c13-XL','存c15-2L','存c17-3L','存c19-4L','存c21-5L','存c23-6L','存cf'],//货品进销存 不导出字段 1维

      ary3:['部类id','颜色id','客户id','客户简称','供应商名称','图片','厂进','总存','进c05-XS','进c07-S','进c09-M','进c11-L','进c13-XL','进c15-2L','进c17-3L','进c19-4L','进c21-5L','进c23-6L','进cf',
      '销c05-XS','销c07-S','销c09-M','销c11-L','销c13-XL','销c15-2L','销c17-3L','销c19-4L','销c21-5L','销c23-6L','销cf',
      '存c05-XS','存c07-S','存c09-M','存c11-L','存c13-XL','存c15-2L','存c17-3L','存c19-4L','存c21-5L','存c23-6L','存cf'],//客户进销存 不导出字段 1维

      isShowList:['commodityType','styleNumber','sellingPrice','colorName','manufacturerName'],
      isShowList1:['commodityType','styleNumber','sellingPrice','colorName','customerNo'],

      kindsNumberList:[],
      // Kh:true,
      Hp:false,
      inputList:[],
      showCustomer: 'none',
      showType: 'none',
      showImg: 'none',

      moveDoc: { //初始位置
        x: null,
        y: null
      },

      customerNo: '',
      Timedate:[],
      customerName: '',
      customerList: [],
      // kindsNumberlIst: '',
      styleNumberList: '',
      dateList: null,
      selectType: '货品进销存',
      selectTypeList: [
        {
          value: '货品进销存',
          label: '货品进销存'
        },
        {
          value: '客户进销存',
          label: '客户进销存'
        }
      ],
      showimage: false,
      twoDimensional: false,
      tableData: [],
      allData:[],
      // 总数据条数
      dataLen: 0,
      // 总页码
      pagesNum: 0,
      // 分页条数
      limit: 20,
      // 当前页码
      currentPage: 1,
      jxAgent: document.cookie.match(RegExp('jxAgent'+'=([^;]+)'))[1] == 1 ? true : false,
      operator: document.cookie.match(RegExp('jxUser'+'=([^;]+)'))[1]
    }
  },
  components: {
    footView,
    screenCustomer,
    screenNum
  },
  methods: {

    //指定列求和
    getList(param) {
      if(this.tableData != ''){
        // console.log(this.zt)
        if(this.zt == 'null'){return}else{
            const { columns, data } = param;
            const sums = [];
            columns.forEach((column, index) => {
              if (index === 0) {
                sums[index] = '合计';
                return;
              }
            const values = data.map(item => Number(item[column.property]));
                if (column.property === 'inputFiveNumber' || column.property === 'inputSevenNumber' ||
                    column.property === 'inputNineNumber' || column.property === 'inputElevenNumber' ||
                    column.property === 'inputThirteenNumber' || column.property === 'inputFifteenNumber' ||
                    column.property === 'inputSeventeenNumber' || column.property === 'inputNineteenNumber' ||
                    column.property === 'inputTwentyOneNumber' || column.property === 'inputTwentyThreeNumber' ||
                    column.property === 'inputFNumber' || column.property === 'sellFiveNumber' ||
                    column.property === 'sellSevenNumber' || column.property === 'sellNineNumber' ||
                    column.property === 'sellElevenNumber' || column.property === 'sellThirteenNumber' ||
                    column.property === 'sellFifteenNumber' || column.property === 'sellSeventeenNumber' ||
                    column.property === 'sellNineteenNumber' || column.property === 'sellTwentyOneNumber' ||
                    column.property === 'sellTwentyThreeNumber' || column.property === 'sellFNumber' ||
                    column.property === 'repertoryFiveNumber' ||
                    column.property === 'repertorySevenNumber' || column.property === 'repertoryNineNumber' ||
                    column.property === 'repertoryElevenNumber' || column.property === 'repertoryThirteenNumber' ||
                    column.property === 'repertoryFifteenNumber' || column.property === 'repertorySeventeenNumber' ||
                    column.property === 'repertoryNineteenNumber' || column.property === 'repertoryTwentyOneNumber' ||
                    column.property === 'repertoryTwentyThreeNumber' || column.property === 'repertoryFNumber' ||
                    column.property === 'factoryInputNumber' || column.property === 'sellingPrice' ||
                    column.property === 'customerInputNumber' || column.property === 'customerSellNumber' ||
                    column.property === 'customerRepertoryNumber' || column.property === 'totalRepertoryNumber' ||
                    column.property === 'customerOutNumber') {
                sums[index] = values.reduce((prev, curr) => {
                  const value = Number(curr);
                  if (!isNaN(value)) {
                    return prev + curr;
                  } else {
                    return prev;
                  }
                }, 0);
                sums[index];
                }
          });
          return sums
        }
      }
    },
    
    Exp(){//导出
      let obj = {
        "pageData.page":this.currentPage,
        "pageData.limit":this.limit,
        isExport:true,
        noExportFieldList:'',//不导出属性
        customerIdList:this.customerNo == '' ? null : JSON.stringify(this.customerNo).replace(/\[|]/g ,'').replace(/\"|"/g ,''),
        styleNumberList: this.styleNumberList == '' ? null : this.styleNumberList,
        startDate: (this.Timedate == null || this.Timedate == '') ? '' : Number(this.Timedate[0].slice(0,4) + this.Timedate[0].slice(5,7) + this.Timedate[0].slice(8,10)),
        endDate: (this.Timedate == null || this.Timedate == '') ? '' : Number(this.Timedate[1].slice(0,4) + this.Timedate[1].slice(5,7) + this.Timedate[1].slice(8,10)),
      }
      if(this.selectType == '货品进销存'){
        if(!this.twoDimensional){
          obj.noExportFieldList = JSON.stringify(this.ary2).replace(/\[|]/g ,'').replace(/\"|"/g ,'')
          inputOutSaveRepertoryIntegratedQuery(obj).then(res=>{
            // console.log(res)
            location.href = `${res.data.data}`
          })
        }else{//二维
            obj.noExportFieldList = JSON.stringify(this.ary).replace(/\[|]/g ,'').replace(/\"|"/g ,'')
            inputOutSaveRepertoryIntegratedQuery(obj).then(res=>{
              // console.log(res)
              location.href = `${res.data.data}`
            })
        }
      }else{
        if(!this.twoDimensional){
          obj.noExportFieldList = JSON.stringify(this.ary3).replace(/\[|]/g ,'').replace(/\"|"/g ,'')
          cutomerDataQuery(obj).then(res=>{
            // console.log(res)
            location.href = `${res.data.data}`
          })
        }else{//二维
            obj.noExportFieldList = JSON.stringify(this.ary1).replace(/\[|]/g ,'').replace(/\"|"/g ,'')
            cutomerDataQuery(obj).then(res=>{
              // console.log(res)
              location.href = `${res.data.data}`
            })
        }
      }
    },
    //筛选客户
    preservationCN(data){
      console.log(data)
      this.customerNo = data[0]
      this.customerName = data[1]
    },
    //筛选款号
    preservation(data){
      console.log(data[1])
      this.styleNumberList = data[1]
    },
    customerNoBlur(){
      if (this.customerNo != '') {
        for (const i of this.customerList) {
          if (this.customerNo == i.value1) {
            this.customerName = i.label
            // this.customerId = i.value1
            return
          }
        }
        this.$message({
            type: 'warning',
            offset:400,
            message: '无此客户编号'
          });
      }
    },

    rowClick(e){
      console.log(e)
      // this.image = e.kindsNumberImages
      this.image = e.image
    },
    search(){
      if(this.selectType == '货品进销存'){
        this.IRIQ()
      }else{
        this.customerQuery()
      }
      
    },
    //货品进销存查询
    IRIQ(){
      let params = {
        "pageData.page":this.currentPage,
        "pageData.limit":this.limit,
        isExport:false,
        // noExportFieldList:[],//不导出属性
        customerIdList:this.customerNo == '' ? null : JSON.stringify(this.customerNo).replace(/\[|]/g ,'').replace(/\"|"/g ,''),
        styleNumberList: this.styleNumberList == '' ? null : this.styleNumberList,
        startDate: (this.Timedate == null || this.Timedate == '') ? '' : Number(this.Timedate[0].slice(0,4) + this.Timedate[0].slice(5,7) + this.Timedate[0].slice(8,10)),
        endDate: (this.Timedate == null || this.Timedate == '') ? '' : Number(this.Timedate[1].slice(0,4) + this.Timedate[1].slice(5,7) + this.Timedate[1].slice(8,10)),
      }
      console.log(params)
      inputOutSaveRepertoryIntegratedQuery(params).then(res => {
        console.log(res.data)
        if(res.data.data == null){
          this.$message({
            type: 'info',
            offset:400,
            message: '未查询到此条件的数据'
          });
          this.tableData = []
          this.dataLen = 0
        }
        if(res.data.data != null){
          this.dataLen = res.data.total
          this.sortArr = res.data.data
          this.ScreenType1(this.sortArr)

          if(this.result != ''){
            this.tableData = this.result
          }else{
            this.tableData = this.sortArr
          }
          
          // this.tableData = this.allData.slice((this.currentPage-1)*this.limit,this.currentPage*this.limit)
        }
      })
    },
    //客户进销存查询
    customerQuery(){
      let params = {
        "pageData.page":this.currentPage,
        "pageData.limit":this.limit,
        isExport:false,
        // noExportFieldList:[],//不导出属性
        customerIdList:this.customerNo == '' ? null : JSON.stringify(this.customerNo).replace(/\[|]/g ,'').replace(/\"|"/g ,''),
        styleNumberList: this.styleNumberList == '' ? null : this.styleNumberList,
        startDate: (this.Timedate == null || this.Timedate == '') ? '' : Number(this.Timedate[0].slice(0,4) + this.Timedate[0].slice(5,7) + this.Timedate[0].slice(8,10)),
        endDate: (this.Timedate == null || this.Timedate == '') ? '' : Number(this.Timedate[1].slice(0,4) + this.Timedate[1].slice(5,7) + this.Timedate[1].slice(8,10)),
      }
      cutomerDataQuery(params).then(res=>{
        console.log(res.data)
        if(res.data.data == null){
          this.$message({
            type: 'info',
            offset:400,
            message: '未查询到此条件的数据'
          });
          this.tableData = []
          this.dataLen = 0
        }
        if(res.data.data != null){
          this.dataLen = res.data.total
          this.sortArr = res.data.data
          this.ScreenType2(this.sortArr)
          if(this.result1 != ''){
            this.tableData = this.result1
          }else{
            this.tableData = this.sortArr
          }
          // this.tableData = this.allData.slice((this.currentPage-1)*this.limit,this.currentPage*this.limit)
        }
      })
    },

    // 每页显示页数改变
    handleSizeChange(val){
      this.limit = val
      // 总页码赋值
      this.pagesNum = Math.ceil(this.dataLen / this.limit)
      if(this.selectType == '货品进销存'){this.IRIQ()}else{this.customerQuery()}
      
    },
    // 当前页改变
    handleCurrentChange(val){
      this.currentPage = val
      if(this.selectType == '货品进销存'){this.IRIQ()}else{this.customerQuery()}
    },
    aka(w,q){
      w.factoryInputNumber = Number(q.factoryInputNumber) + Number(w.factoryInputNumber);
      w.customerOutNumber = Number(q.customerOutNumber) + Number(w.customerOutNumber);
      w.customerSellNumber = Number(q.customerSellNumber) + Number(w.customerSellNumber);
      w.totalRepertoryNumber = Number(q.totalRepertoryNumber) + Number(w.totalRepertoryNumber);

      w.inputFiveNumber = Number(q.inputFiveNumber) + Number(w.inputFiveNumber);
      w.inputSevenNumber = Number(q.inputSevenNumber) + Number(w.inputSevenNumber);
      w.inputNineNumber = Number(q.inputNineNumber) + Number(w.inputNineNumber);
      w.inputElevenNumber = Number(q.inputElevenNumber) + Number(w.inputElevenNumber);
      w.inputThirteenNumber = Number(q.inputThirteenNumber) + Number(w.inputThirteenNumber);
      w.inputFifteenNumber = Number(q.inputFifteenNumber) + Number(w.inputFifteenNumber);
      w.inputSeventeenNumber = Number(q.inputSeventeenNumber) + Number(w.inputSeventeenNumber);
      w.inputNineteenNumber = Number(q.inputNineteenNumber) + Number(w.inputNineteenNumber);
      w.inputTwentyOneNumber = Number(q.inputTwentyOneNumber) + Number(w.inputTwentyOneNumber);
      w.inputTwentyThreeNumber = Number(q.inputTwentyThreeNumber) + Number(w.inputTwentyThreeNumber);
      w.inputFNumber = Number(q.inputFNumber) + Number(w.inputFNumber);

      w.sellFiveNumber = Number(q.sellFiveNumber) + Number(w.sellFiveNumber);
      w.sellSevenNumber = Number(q.sellSevenNumber) + Number(w.sellSevenNumber);
      w.sellNineNumber = Number(q.sellNineNumber) + Number(w.sellNineNumber);
      w.sellElevenNumber = Number(q.sellElevenNumber) + Number(w.sellElevenNumber);
      w.sellThirteenNumber = Number(q.sellThirteenNumber) + Number(w.sellThirteenNumber);
      w.sellFifteenNumber = Number(q.sellFifteenNumber) + Number(w.sellFifteenNumber);
      w.sellSeventeenNumber = Number(q.sellSeventeenNumber) + Number(w.sellSeventeenNumber);
      w.sellNineteenNumber = Number(q.sellNineteenNumber) + Number(w.sellNineteenNumber);
      w.sellTwentyOneNumber = Number(q.sellTwentyOneNumber) + Number(w.sellTwentyOneNumber);
      w.sellTwentyThreeNumber = Number(q.sellTwentyThreeNumber) + Number(w.sellTwentyThreeNumber);
      w.sellFNumber = Number(q.sellFNumber) + Number(w.sellFNumber);

      w.repertoryFiveNumber = Number(q.repertoryFiveNumber) + Number(w.repertoryFiveNumber);
      w.repertorySevenNumber = Number(q.repertorySevenNumber) + Number(w.repertorySevenNumber);
      w.repertoryNineNumber = Number(q.repertoryNineNumber) + Number(w.repertoryNineNumber);
      w.repertoryElevenNumber = Number(q.repertoryElevenNumber) + Number(w.repertoryElevenNumber);
      w.repertoryThirteenNumber = Number(q.repertoryThirteenNumber) + Number(w.repertoryThirteenNumber);
      w.repertoryFifteenNumber = Number(q.repertoryFifteenNumber) + Number(w.repertoryFifteenNumber);
      w.repertorySeventeenNumber = Number(q.repertorySeventeenNumber) + Number(w.repertorySeventeenNumber);
      w.repertoryNineteenNumber = Number(q.repertoryNineteenNumber) + Number(w.repertoryNineteenNumber);
      w.repertoryTwentyOneNumber = Number(q.repertoryTwentyOneNumber) + Number(w.repertoryTwentyOneNumber);
      w.repertoryTwentyThreeNumber = Number(q.repertoryTwentyThreeNumber) + Number(w.repertoryTwentyThreeNumber);
      w.repertoryFNumber = Number(q.repertoryFNumber) + Number(w.repertoryFNumber);
    },
    //筛选
    ScreenType1(Arr1){
      let index = this.isShowList.indexOf('commodityType')
      let index1 = this.isShowList.indexOf('styleNumber')
      let index2 = this.isShowList.indexOf('sellingPrice')
      let index3 = this.isShowList.indexOf('colorName')
      let index4 = this.isShowList.indexOf('manufacturerName')

      if(index != -1 && index1 != -1 && index2 != -1 && index3 != -1 && index4 != -1){//全选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].sellingPrice == this.result[w].sellingPrice && Arr1[q].colorName == this.result[w].colorName && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])//调用共用函数赋值
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 != -1 && index2 != -1 && index3 != -1 && index4 != -1){ //部类不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].colorName == this.result[w].colorName && Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].sellingPrice == this.result[w].sellingPrice && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 == -1 && index2 != -1 && index3 != -1 && index4 != -1){ //部类 款号不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].colorName == this.result[w].colorName && Arr1[q].sellingPrice == this.result[w].sellingPrice && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 != -1 && index2 == -1 && index3 != -1 && index4 != -1){ //部类 售价不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].colorName == this.result[w].colorName && Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 != -1 && index2 != -1 && index3 == -1 && index4 != -1){ //部类 颜色不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].sellingPrice == this.result[w].sellingPrice && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 != -1 && index2 != -1 && index3 != -1 && index4 == -1){ //部类 厂商不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].colorName == this.result[w].colorName && Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].sellingPrice == this.result[w].sellingPrice){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 == -1 && index2 == -1 && index3 != -1 && index4 != -1){ //部类 款号 售价不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].colorName == this.result[w].colorName && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 == -1 && index2 != -1 && index3 == -1 && index4 != -1){ //部类 款号 尺寸不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].sellingPrice == this.result[w].sellingPrice && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 == -1 && index2 != -1 && index3 != -1 && index4 == -1){ //部类 款号 厂商不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].sellingPrice == this.result[w].sellingPrice && Arr1[q].colorName == this.result[w].colorName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 != -1 && index2 == -1 && index3 == -1 && index4 != -1){ //部类 售价 尺寸不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 != -1 && index2 == -1 && index3 != -1 && index4 == -1){ //部类 售价 厂商不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].colorName == this.result[w].colorName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 != -1 && index2 != -1 && index3 == -1 && index4 == -1){ //部类 尺寸 厂商不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].sellingPrice == this.result[w].sellingPrice){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }



      if(index != -1 && index1 == -1 && index2 != -1 && index3 != -1 && index4 != -1){ //款号不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].colorName == this.result[w].colorName && Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].sellingPrice == this.result[w].sellingPrice && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index != -1 && index1 == -1 && index2 == -1 && index3 != -1 && index4 != -1){ //款号 售价不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].colorName == this.result[w].colorName && Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index != -1 && index1 == -1 && index2 != -1 && index3 == -1 && index4 != -1){ //款号 颜色不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].sellingPrice == this.result[w].sellingPrice && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index != -1 && index1 == -1 && index2 != -1 && index3 != -1 && index4 == -1){ //款号 厂商不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].colorName == this.result[w].colorName && Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].sellingPrice == this.result[w].sellingPrice){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index != -1 && index1 == -1 && index2 == -1 && index3 == -1 && index4 != -1){ //款号 售价 颜色不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index != -1 && index1 == -1 && index2 == -1 && index3 != -1 && index4 == -1){ //款号 售价 厂商不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].colorName == this.result[w].colorName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index != -1 && index1 == -1 && index2 != -1 && index3 == -1 && index4 == -1){ //款号 颜色 供应商
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].sellingPrice == this.result[w].sellingPrice){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }
      


      if(index != -1 && index1 != -1 && index2 == -1 && index3 != -1 && index4 != -1){ //售价不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].colorName == this.result[w].colorName && Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index != -1 && index1 != -1 && index2 == -1 && index3 == -1 && index4 != -1){ //售价 颜色不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index != -1 && index1 != -1 && index2 == -1 && index3 != -1 && index4 == -1){ //售价 厂商不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].colorName == this.result[w].colorName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index != -1 && index1 != -1 && index2 == -1 && index3 == -1 && index4 == -1){ //售价 颜色 供应商
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].styleNumber == this.result[w].styleNumber){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }


      if(index != -1 && index1 != -1 && index2 != -1 && index3 == -1 && index4 != -1){ //颜色不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].sellingPrice == this.result[w].sellingPrice && Arr1[q].manufacturerName == this.result[w].manufacturerName){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index != -1 && index1 != -1 && index2 != -1 && index3 == -1 && index4 == -1){ //颜色 厂商不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].styleNumber == this.result[w].styleNumber && Arr1[q].sellingPrice == this.result[w].sellingPrice){
              flag=false;
              this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }


      if(index != -1 && index1 != -1 && index2 != -1 && index3 != -1 && index4 == -1){//厂商不选
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType && Arr1[q].sellingPrice == this.result[w].sellingPrice && Arr1[q].colorName == this.result[w].colorName && Arr1[q].styleNumber == this.result[w].styleNumber){
            flag=false;
            this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }


      if(index != -1 && index1 == -1 && index2 == -1 && index3 == -1 && index4 == -1){//只有部类
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].commodityType == this.result[w].commodityType){
            flag=false;
            this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 != -1 && index2 == -1 && index3 == -1 && index4 == -1){//只款号
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].styleNumber == this.result[w].styleNumber){
            flag=false;
            this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 == -1 && index2 != -1 && index3 == -1 && index4 == -1){//只售价
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].sellingPrice == this.result[w].sellingPrice){
            flag=false;
            this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 == -1 && index2 == -1 && index3 != -1 && index4 == -1){//只尺寸
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].colorName == this.result[w].colorName){
            flag=false;
            this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }

      if(index == -1 && index1 == -1 && index2 == -1 && index3 == -1 && index4 != -1){//只厂商
        this.result=[];
        let flag=true;
        this.result.push(Arr1[0]);
        for(let q=1;q<Arr1.length;q++){
          flag=true;
          for(let w=0;w<this.result.length;w++){
            if(Arr1[q].manufacturerName == this.result[w].manufacturerName){
            flag=false;
            this.aka(this.result[w],Arr1[q])
            }
          }
          if(flag==true)
          this.result.push(Arr1[q]);
        }
        console.log(this.result)
        return
      }
    },

    aka1(w,q){
      w.customerInputNumber = Number(q.customerInputNumber) + Number(w.customerInputNumber);
      w.customerOutNumber = Number(q.customerOutNumber) + Number(w.customerOutNumber);
      w.customerSellNumber = Number(q.customerSellNumber) + Number(w.customerSellNumber);
      w.customerRepertoryNumber = Number(q.customerRepertoryNumber) + Number(w.customerRepertoryNumber);

      w.inputFiveNumber = Number(q.inputFiveNumber) + Number(w.inputFiveNumber);
      w.inputSevenNumber = Number(q.inputSevenNumber) + Number(w.inputSevenNumber);
      w.inputNineNumber = Number(q.inputNineNumber) + Number(w.inputNineNumber);
      w.inputElevenNumber = Number(q.inputElevenNumber) + Number(w.inputElevenNumber);
      w.inputThirteenNumber = Number(q.inputThirteenNumber) + Number(w.inputThirteenNumber);
      w.inputFifteenNumber = Number(q.inputFifteenNumber) + Number(w.inputFifteenNumber);
      w.inputSeventeenNumber = Number(q.inputSeventeenNumber) + Number(w.inputSeventeenNumber);
      w.inputNineteenNumber = Number(q.inputNineteenNumber) + Number(w.inputNineteenNumber);
      w.inputTwentyOneNumber = Number(q.inputTwentyOneNumber) + Number(w.inputTwentyOneNumber);
      w.inputTwentyThreeNumber = Number(q.inputTwentyThreeNumber) + Number(w.inputTwentyThreeNumber);
      w.inputFNumber = Number(q.inputFNumber) + Number(w.inputFNumber);

      w.sellFiveNumber = Number(q.sellFiveNumber) + Number(w.sellFiveNumber);
      w.sellSevenNumber = Number(q.sellSevenNumber) + Number(w.sellSevenNumber);
      w.sellNineNumber = Number(q.sellNineNumber) + Number(w.sellNineNumber);
      w.sellElevenNumber = Number(q.sellElevenNumber) + Number(w.sellElevenNumber);
      w.sellThirteenNumber = Number(q.sellThirteenNumber) + Number(w.sellThirteenNumber);
      w.sellFifteenNumber = Number(q.sellFifteenNumber) + Number(w.sellFifteenNumber);
      w.sellSeventeenNumber = Number(q.sellSeventeenNumber) + Number(w.sellSeventeenNumber);
      w.sellNineteenNumber = Number(q.sellNineteenNumber) + Number(w.sellNineteenNumber);
      w.sellTwentyOneNumber = Number(q.sellTwentyOneNumber) + Number(w.sellTwentyOneNumber);
      w.sellTwentyThreeNumber = Number(q.sellTwentyThreeNumber) + Number(w.sellTwentyThreeNumber);
      w.sellFNumber = Number(q.sellFNumber) + Number(w.sellFNumber);

      w.repertoryFiveNumber = Number(q.repertoryFiveNumber) + Number(w.repertoryFiveNumber);
      w.repertorySevenNumber = Number(q.repertorySevenNumber) + Number(w.repertorySevenNumber);
      w.repertoryNineNumber = Number(q.repertoryNineNumber) + Number(w.repertoryNineNumber);
      w.repertoryElevenNumber = Number(q.repertoryElevenNumber) + Number(w.repertoryElevenNumber);
      w.repertoryThirteenNumber = Number(q.repertoryThirteenNumber) + Number(w.repertoryThirteenNumber);
      w.repertoryFifteenNumber = Number(q.repertoryFifteenNumber) + Number(w.repertoryFifteenNumber);
      w.repertorySeventeenNumber = Number(q.repertorySeventeenNumber) + Number(w.repertorySeventeenNumber);
      w.repertoryNineteenNumber = Number(q.repertoryNineteenNumber) + Number(w.repertoryNineteenNumber);
      w.repertoryTwentyOneNumber = Number(q.repertoryTwentyOneNumber) + Number(w.repertoryTwentyOneNumber);
      w.repertoryTwentyThreeNumber = Number(q.repertoryTwentyThreeNumber) + Number(w.repertoryTwentyThreeNumber);
      w.repertoryFNumber = Number(q.repertoryFNumber) + Number(w.repertoryFNumber);
    },
    //筛选
    ScreenType2(Arr1){
        let index = this.isShowList1.indexOf('commodityType')
        let index1 = this.isShowList1.indexOf('styleNumber')
        let index2 = this.isShowList1.indexOf('sellingPrice')
        let index3 = this.isShowList1.indexOf('colorName')
        let index4 = this.isShowList1.indexOf('customerNo')

        if(index != -1 && index1 != -1 && index2 != -1 && index3 != -1 && index4 != -1){//全选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].sellingPrice == this.result1[w].sellingPrice && Arr1[q].colorName == this.result1[w].colorName && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])//调用共用函数赋值
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 != -1 && index2 != -1 && index3 != -1 && index4 != -1){ //部类不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].colorName == this.result1[w].colorName && Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].sellingPrice == this.result1[w].sellingPrice && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 == -1 && index2 != -1 && index3 != -1 && index4 != -1){ //部类 款号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].colorName == this.result1[w].colorName && Arr1[q].sellingPrice == this.result1[w].sellingPrice && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 != -1 && index2 == -1 && index3 != -1 && index4 != -1){ //部类 售价不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].colorName == this.result1[w].colorName && Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 != -1 && index2 != -1 && index3 == -1 && index4 != -1){ //部类 颜色不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].sellingPrice == this.result1[w].sellingPrice && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 != -1 && index2 != -1 && index3 != -1 && index4 == -1){ //部类 客户编号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].colorName == this.result1[w].colorName && Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].sellingPrice == this.result1[w].sellingPrice){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 == -1 && index2 == -1 && index3 != -1 && index4 != -1){ //部类 款号 售价不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].colorName == this.result1[w].colorName && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 == -1 && index2 != -1 && index3 == -1 && index4 != -1){ //部类 款号 尺寸不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].sellingPrice == this.result1[w].sellingPrice && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 == -1 && index2 != -1 && index3 != -1 && index4 == -1){ //部类 款号 客户编号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].sellingPrice == this.result1[w].sellingPrice && Arr1[q].colorName == this.result1[w].colorName){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 != -1 && index2 == -1 && index3 == -1 && index4 != -1){ //部类 售价 尺寸不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 != -1 && index2 == -1 && index3 != -1 && index4 == -1){ //部类 售价 客户编号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].colorName == this.result1[w].colorName){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 != -1 && index2 != -1 && index3 == -1 && index4 == -1){ //部类 尺寸 客户编号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].sellingPrice == this.result1[w].sellingPrice){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }



        if(index != -1 && index1 == -1 && index2 != -1 && index3 != -1 && index4 != -1){ //款号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].colorName == this.result1[w].colorName && Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].sellingPrice == this.result1[w].sellingPrice && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index != -1 && index1 == -1 && index2 == -1 && index3 != -1 && index4 != -1){ //款号 售价不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].colorName == this.result1[w].colorName && Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index != -1 && index1 == -1 && index2 != -1 && index3 == -1 && index4 != -1){ //款号 颜色不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].sellingPrice == this.result1[w].sellingPrice && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index != -1 && index1 == -1 && index2 != -1 && index3 != -1 && index4 == -1){ //款号 客户编号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].colorName == this.result1[w].colorName && Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].sellingPrice == this.result1[w].sellingPrice){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index != -1 && index1 == -1 && index2 == -1 && index3 == -1 && index4 != -1){ //款号 售价 颜色不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index != -1 && index1 == -1 && index2 == -1 && index3 != -1 && index4 == -1){ //款号 售价 客户编号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].colorName == this.result1[w].colorName){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index != -1 && index1 == -1 && index2 != -1 && index3 == -1 && index4 == -1){ //款号 颜色 供应商
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].sellingPrice == this.result1[w].sellingPrice){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }
        


        if(index != -1 && index1 != -1 && index2 == -1 && index3 != -1 && index4 != -1){ //售价不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].colorName == this.result1[w].colorName && Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index != -1 && index1 != -1 && index2 == -1 && index3 == -1 && index4 != -1){ //售价 颜色不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index != -1 && index1 != -1 && index2 == -1 && index3 != -1 && index4 == -1){ //售价 客户编号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].colorName == this.result1[w].colorName){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index != -1 && index1 != -1 && index2 == -1 && index3 == -1 && index4 == -1){ //售价 颜色 供应商
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].styleNumber == this.result1[w].styleNumber){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }


        if(index != -1 && index1 != -1 && index2 != -1 && index3 == -1 && index4 != -1){ //颜色不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].sellingPrice == this.result1[w].sellingPrice && Arr1[q].customerNo == this.result1[w].customerNo){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index != -1 && index1 != -1 && index2 != -1 && index3 == -1 && index4 == -1){ //颜色 客户编号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].styleNumber == this.result1[w].styleNumber && Arr1[q].sellingPrice == this.result1[w].sellingPrice){
                flag=false;
                this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }


        if(index != -1 && index1 != -1 && index2 != -1 && index3 != -1 && index4 == -1){//客户编号不选
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType && Arr1[q].sellingPrice == this.result1[w].sellingPrice && Arr1[q].colorName == this.result1[w].colorName && Arr1[q].styleNumber == this.result1[w].styleNumber){
              flag=false;
              this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }


        if(index != -1 && index1 == -1 && index2 == -1 && index3 == -1 && index4 == -1){//只有部类
        console.log('zhi bl')
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].commodityType == this.result1[w].commodityType){
              flag=false;
              this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 != -1 && index2 == -1 && index3 == -1 && index4 == -1){//只款号
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].styleNumber == this.result1[w].styleNumber){
              flag=false;
              this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 == -1 && index2 != -1 && index3 == -1 && index4 == -1){//只售价
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].sellingPrice == this.result1[w].sellingPrice){
              flag=false;
              this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 == -1 && index2 == -1 && index3 != -1 && index4 == -1){//只尺寸
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].colorName == this.result1[w].colorName){
              flag=false;
              this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }

        if(index == -1 && index1 == -1 && index2 == -1 && index3 == -1 && index4 != -1){//只客户编号
          this.result1=[];
          let flag=true;
          this.result1.push(Arr1[0]);
          for(let q=1;q<Arr1.length;q++){
            flag=true;
            for(let w=0;w<this.result1.length;w++){
              if(Arr1[q].customerNo == this.result1[w].customerNo){
              flag=false;
              this.aka1(this.result1[w],Arr1[q])
              }
            }
            if(flag==true)
            this.result1.push(Arr1[q]);
          }
          console.log(this.result1)
          return
        }
      },
    
  },
  mounted(){
    imgBox.onmousedown = function(event){
      let imgBox=document.getElementById("imgBox")
      let rex=event.clientX - imgBox.offsetLeft
      let rey=event.clientY - imgBox.offsetTop
      document.onmousemove = e=>{ 
        let xX = 0
        let yY = 0
        xX=e.clientX
        yY=e.clientY
        imgBox.style.left = (xX-rex) + "px"
        imgBox.style.top = (yY-rey) + "px"
      }
    }
    document.onmouseup=()=>{
      document.onmousemove=null
    }
  },
  watch:{
    dataLen(a,b){
      this.pagesNum = Math.ceil(this.dataLen / this.limit)
    },
    bl(a,b){
      if(this.selectType == '货品进销存'){
        if(!a){this.isShowList.forEach((e,i)=>{if(e == 'commodityType'){this.isShowList.splice(i,1)}})
        }else{
          if(this.isShowList.indexOf('commodityType') == -1){this.isShowList.push('commodityType')}
        }
        this.ScreenType1(this.sortArr)
        if(this.result != ''){
          this.tableData = this.result
        }else{
          this.tableData = this.sortArr
        }
        console.log(this.isShowList)
      }
      if(this.selectType == '客户进销存'){
        if(!a){this.isShowList1.forEach((e,i)=>{if(e == 'commodityType'){this.isShowList1.splice(i,1)}})
        }else{
          if(this.isShowList1.indexOf('commodityType') == -1){this.isShowList1.push('commodityType')}
        }
        this.ScreenType2(this.sortArr)
          if(this.result1 != ''){
            this.tableData = this.result1
          }else{
            this.tableData = this.sortArr
          }
        // console.log(this.isShowList1,2)
      }
    },
    styleNum(a,b){
      if(this.selectType == '货品进销存'){
        if(!a){this.isShowList.forEach((e,i)=>{if(e == 'styleNumber'){this.isShowList.splice(i,1)}})
        }else{
          if(this.isShowList.indexOf('styleNumber') == -1){this.isShowList.push('styleNumber')}
        }
        this.ScreenType1(this.sortArr)
        if(this.result != ''){
          this.tableData = this.result
        }else{
          this.tableData = this.sortArr
        }
        console.log(this.isShowList)
      }
      if(this.selectType == '客户进销存'){
        if(!a){this.isShowList1.forEach((e,i)=>{if(e == 'styleNumber'){this.isShowList1.splice(i,1)}})
        }else{
          if(this.isShowList1.indexOf('styleNumber') == -1){this.isShowList1.push('styleNumber')}
        }
        this.ScreenType2(this.sortArr)
          if(this.result1 != ''){
            this.tableData = this.result1
          }else{
            this.tableData = this.sortArr
          }
        // console.log(this.isShowList1,2)
      }
    },
    price(a,b){
      if(this.selectType == '货品进销存'){
        if(!a){this.isShowList.forEach((e,i)=>{if(e == 'sellingPrice'){this.isShowList.splice(i,1)}})
        }else{
          if(this.isShowList.indexOf('sellingPrice') == -1){this.isShowList.push('sellingPrice')}
        }
        this.ScreenType1(this.sortArr)
        if(this.result != ''){
          this.tableData = this.result
        }else{
          this.tableData = this.sortArr
        }
        console.log(this.isShowList)
      }
      if(this.selectType == '客户进销存'){
        if(!a){this.isShowList1.forEach((e,i)=>{if(e == 'sellingPrice'){this.isShowList1.splice(i,1)}})
        }else{
          if(this.isShowList1.indexOf('sellingPrice') == -1){this.isShowList1.push('sellingPrice')}
        }
        this.ScreenType2(this.sortArr)
          if(this.result1 != ''){
            this.tableData = this.result1
          }else{
            this.tableData = this.sortArr
          }
        // console.log(this.isShowList1,2)
      }
    },
    colorName(a,b){
      if(this.selectType == '货品进销存'){
        if(!a){this.isShowList.forEach((e,i)=>{if(e == 'colorName'){this.isShowList.splice(i,1)}})
        }else{
          if(this.isShowList.indexOf('colorName') == -1){this.isShowList.push('colorName')}
        }
        this.ScreenType1(this.sortArr)
        if(this.result != ''){
          this.tableData = this.result
        }else{
          this.tableData = this.sortArr
        }
        // console.log(this.isShowList)
      }
      if(this.selectType == '客户进销存'){
        if(!a){this.isShowList1.forEach((e,i)=>{if(e == 'colorName'){this.isShowList1.splice(i,1)}})
        }else{
          if(this.isShowList1.indexOf('colorName') == -1){this.isShowList1.push('colorName')}
        }
        this.ScreenType2(this.sortArr)
          if(this.result1 != ''){
            this.tableData = this.result1
          }else{
            this.tableData = this.sortArr
          }
        // console.log(this.isShowList1,2)
      }
    },
    supplier(a,b){
      if(this.selectType == '货品进销存'){
        if(!a){
          this.isShowList.forEach((e,i)=>{if(e == 'manufacturerName'){this.isShowList.splice(i,1)}})
        }else{
          if(this.isShowList.indexOf('manufacturerName') == -1){this.isShowList.push('manufacturerName')}
        }
        this.ScreenType1(this.sortArr)
        if(this.result != ''){
          this.tableData = this.result
        }else{
          this.tableData = this.sortArr
        }
        // console.log(this.isShowList)
      }
    },
    customerno(a,b){
      if(this.selectType == '客户进销存'){
        if(!a){
          this.isShowList1.forEach((e,i)=>{if(e == 'customerNo'){this.isShowList1.splice(i,1)}})
        }else{
          if(this.isShowList1.indexOf('customerNo') == -1){this.isShowList1.push('customerNo')}
        }
        this.ScreenType2(this.sortArr)
          if(this.result1 != ''){
            this.tableData = this.result1
          }else{
            this.tableData = this.sortArr
          }
        console.log(this.isShowList1,2)
      }
    },

    customerNo(a,b){
      // if(a != undefined){
        // this.customerNo = a.toUpperCase().trim()
      // }
    },
    styleNumberList(a,b){
      if(a != undefined){
        this.styleNumberList = a.toUpperCase().trim().replace(/，/ig,',')//中文逗号转英文
      }
    },
    showimage(a,b){
      if(a){
        this.showImg = 'block'
      }else{
        this.showImg = 'none'
      }
    },
    selectType(a,b){
      console.log(a,b)
      if(a == '货品进销存'){
        this.Hp = false
        this.kh = 'none'
        this.gys = 'block'
        this.supplier = true
        this.customerno = false
        this.isShowList = ['commodityType','styleNumber','sellingPrice','colorName','manufacturerName'],
        // this.customerno = false,
        this.supplier = true,
        this.styleNum = true,
        this.price = true,
        this.bl = true,
        this.colorName = true,
        this.ScreenType1(this.sortArr)
        if(this.result != ''){
          this.tableData = this.result
        }else{
          this.tableData = this.sortArr
        }
      }else{
        this.Hp = true
        this.kh = 'block'
        this.gys = 'none'
        this.supplier = false
        this.customerno = true
        this.isShowList1 = ['commodityType','styleNumber','sellingPrice','colorName','customerNo'],
        this.customerno = true,
        // this.supplier = true,
        this.styleNum = true,
        this.price = true,
        this.bl = true,
        this.colorName = true,
        this.ScreenType2(this.sortArr)
          if(this.result1 != ''){
            this.tableData = this.result1
          }else{
            this.tableData = this.sortArr
          }
      }
    },
  }
}
</script>


<style scoped>
  .integratedQuery {
    margin-right: 15px;
    padding: 0 15px;
    background-color: white;
    height: 94.5vh;
    position: relative;
  }
  /* 头部 */
  .topbar{
    height: 60px;
    display: flex;
    white-space: nowrap;
    border-bottom: 2px solid #f4f4f4;
  }
  .topbar p{
    margin: 0 10px 0 20px;
    line-height: 60px;
  }

  /* 按钮 */
  .operation{
    display: flex;
    padding: 10px 0;
    white-space: nowrap;
    justify-content: space-between;
  }
  .operation div{
    display: flex;
  }
  .operation span{
    float: right;
    white-space: nowrap;
  }

  .footView span{
    float: left;
    margin-right: 48px;
    line-height: 6vh;
    font-size: 14px;
  }

  .integratedQuery #imgBox{ 
    position: absolute;
    width: 300px;
    height: 375;
    z-index: 1;
    top: 35%;
    right: 50%;
  }
  .integratedQuery #imgBox .imgTop{
    background-color: #f4f4f4;
    width: 300px;
    height: 30px;
    padding-left: 10px;
  }
  .integratedQuery #imgBox .imgTop i{
    float: right;
    height: 30px;
    width: 30px;
    line-height: 30px;
  }
  .integratedQuery #imgBox img{
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    background-color: bisque;
  }
</style>

<style>
  .integratedQuery .topbar .el-input{
    margin: 15px 10px 0 0;
    width: 160px;
  }
  .integratedQuery .topbar .el-input__inner{
    height: 30px;
  }
  .integratedQuery .topbar .el-select{
    width: 160px;
  }
  .integratedQuery .topbar .el-select .el-input{
    width: 100%;
  }
  .integratedQuery .el-button{
    padding: 8px 15px;
    height: 30px;
  }
  .integratedQuery .el-date-editor {
    width: 400px;
    margin-top: 15px;
  }

  .integratedQuery .el-input__icon , .integratedQuery .el-date-editor .el-range-separator{
    line-height: 22px;
  }

  .integratedQuery .el-checkbox.is-bordered{
    margin: 0 0 0 10px;
    padding: 0 10px;
    height: 30px;
    line-height: 30px;
  }
</style>